package oocl.ita.eordering.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import oocl.ita.eordering.po.Food;
import oocl.ita.eordering.service.FoodService;

@Controller
@RequestMapping
public class ADFoodController {
	@Autowired
	private FoodService foodService; 
	// 根据广告页上菜品链接至商家所以菜品
	@RequestMapping("/aDFoodController")
	public String aDFoodController(Integer fId) {
		System.out.println(1111);
		Food food=foodService.findFoodById(fId);
		String url="/showFood?mId="+food.getmId();
		return "redirect:"+url;
	}

}
